﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LanguageInfo.IDAL;
using System.Reflection;

namespace LanguageInfo.Factory
{
    public class LanguageInfoFactory
    {
        private const string Path = "LanguageInfo.DAL";

        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public static IUserInfoDAL CreateUserInfoDAL()
        {
            string className = Path + ".UserInfoDAL";
            return (IUserInfoDAL)Assembly.Load(Path).CreateInstance(className);
        }

        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public static ICorporaDAL CreateCorporaDAL()
        {
            string className = Path + ".CorporaDAL";
            return (ICorporaDAL)Assembly.Load(Path).CreateInstance(className);
        }

        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public static IWordsDAL CreateWordsDAL()
        {
            string className = Path + ".WordsDAL";
            return (IWordsDAL)Assembly.Load(Path).CreateInstance(className);
        }
    }
}
